package fun.lifepoem.store.utils;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 * @author Yiwyn
 * @create 2023/3/11 21:15
 */
public class DocUtils {

    private static final ObjectMapper objectMapper = new ObjectMapper();

    public static <T> String toJSONString(T data) throws JsonProcessingException {
        String json = objectMapper.writeValueAsString(data);
        return json;
    }

}
